import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

class Counter with ChangeNotifier, DiagnosticableTreeMixin{
  
  /// 状态
  int _count = 0;

  /// 获取状态
  int get count => _count;

  /// 更新状态
  increment() {
    _count++;
    notifyListeners(); // 表示更新状态
  }

}